<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%--
  Created by IntelliJ IDEA.
  User: Jager
  Date: 2019/7/3
  Time: 15:00
  To change this template use File | Settings | File Templates.
--%>
<html>
<head>



    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>

    <%@include file="/include.jsp" %>
    <script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js">

    </script>
    <style>
        body{font-family:"微软雅黑";padding-top:10px;margin:0px;}
    </style>
    <script type="text/javascript">

        function searchFn(pageNow){
            $("#searchform").attr("action","<%=basePath %>/all/selectALL?pageNow="+pageNow).submit();
        }


    </script>
</head>
<body>

<!--xxx-->
<div>
    <!--tab-->
    <ul class="nav nav-pills nav-justified" style="border-bottom:solid 3px rgb(66, 139, 202);">
        <li  class="active" role="presentation" style="width:120px;">
            <a href="javascript:void(0)" id="tabTitle" >采购审批列表</a>
        </li>
    </ul>
    <input type="hidden" value="<%=basePath %>" id="path">
    <!--toolsbar-->
    <div class="panel panel-default">
        <div class="panel-body">

            <form class="form-inline" id="searchform" method="post" action="<%=basePath %>hateee">

                <div class="form-group">
                    <label for="organName">采购单号</label>
                    <input type="text" class="form-control input-sm" name="organName" id="organName" placeholder="请输入查询单号">
                </div>
                <button type="submit" class="btn btn-primary">查询</button>


        </div>
    </div>
    <!--datagrid-->
    <div class="table-responsive" style="overflow-y:hidden">
        <table class="table table-striped" >
            <tbody>
            <tr>
                <th>序号</th><th>采购单号</th><th>创建日期</th> <th>煤种</th><th>数量(万吨)</th><th>结算方式</th><th>发起人</th><th>状态</th><th>操作</th>
            </tr>
            <c:forEach items="${rows}" var="e">
                <tr>
                    <td>${e.purchapplyid}</td> <td>${e.billnumber}</td> <td>${e.createdate}</td> <td>${e.coaltype}</td> <td>${e.qty}</td> <td>${e.jiesuanMode}</td> <td>${e.createuser}</td> <td>${e.executestate}</td> <td><a href="<%=basePath%>/hello?id=${e.purchapplyid}">审批</a></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <!--分页-->
        <nav  >
            <ul class="pagination"  >
                <li class="" ><a  href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)" onclick="searchFn('1')" >首页 <span class="sr-only"></span></a></li>
                <li class=""><a href="javascript:void(0)"  onmouseout="pageOut(this)" onmouseover="pageOver(this)" onclick="searchFn('${page.pageNow-1}')" ><span aria-hidden="true">上一页&laquo;</span></a></li>
                <li class=""><a href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)"  onclick="searchFn('${page.pageNow+1}')" ><span aria-hidden="true">下一页&raquo;</span></a></li>
                <li class=""><a href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)"  onclick="searchFn('${page.totalPage}')">尾页 <span class="sr-only" ></span></a></li>
                <li class=""><a href="javascript:void(0)" >当前第${page.pageNow}页
                   总页数：${page.totalPage}页总记录数：${page.total}</a></li>

            </ul>
        </nav>
        </form>
    </div>

</div>
</div>
</div>
</body>


</html>
